//
//  RadioDetailTableViewCell.m
//  CwinCar
//
//  Created by dlios on 15/10/21.
//  Copyright © 2015年 dlios. All rights reserved.
//

#import "RadioDetailTableViewCell.h"

@implementation RadioDetailTableViewCell
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if ([super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        self.titleLabel = [[UILabel alloc]initWithFrame:CGRectMake(10, 10, mainScreen_Width-20, 15)];
        self.titleLabel.font = [UIFont systemFontOfSize:14.];
        [self.contentView addSubview:self.titleLabel];
        
        
        self.joinLabel = [[UILabel alloc]initWithFrame:CGRectMake(10, 40, mainScreen_Width/5., 10)];
        self.joinLabel.font = [UIFont systemFontOfSize:12.];
        [self.contentView addSubview:self.joinLabel];
        
        self.timeLabel = [[UILabel alloc]initWithFrame:CGRectMake(mainScreen_Width/3., 40, mainScreen_Width/3., 10)];
        self.timeLabel.font = [UIFont systemFontOfSize:12.];
        [self.contentView addSubview:self.timeLabel];
    }
    
    return self;
}
-(void)setDetailCell:(DetailRadioModel *)model
{
    //    NSLog(@"wada     %@", model.program_title);
    self.titleLabel.text = [model.program_live_time stringByAppendingString:[NSString stringWithFormat:@"  %@",model.program_title]];
    
    self.joinLabel.text = [NSString stringWithFormat:@"听众:%ld",model.program_join_num];
    
    self.timeLabel.text = [NSString stringWithFormat:@"时长:%@" ,model.program_time_length];
    
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
